# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-fuzzylogic
_pkgorig=fuzzylogic
pkgver=1.2.0
pkgrel=3
pkgdesc="Fuzzy Logic and Fuzzy Inference implementations"
url="https://github.com/amogorkon/fuzzylogic/"
arch="all !s390x !armv7" # assertionErrors
license="MIT"
depends="python3 py3-matplotlib py3-numpy py3-pandas"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-hypothesis py3-pytest-xdist"
subpackages="$pkgname-pyc"
source="https://github.com/amogorkon/fuzzylogic/archive/v$pkgver/$_pkgorig-$pkgver.tar.gz"
builddir="$srcdir/$_pkgorig-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -n auto -k 'not test_eq and not test_units'
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
f47d01ace5760cbfcd21a9786744a6f7ded59066d2f06fa7d5b3d9d2dc22b6fe016c991e784f5c272262e5988a3bab15d7dec7fb6df8f8ffc65166d4431ea025  fuzzylogic-1.2.0.tar.gz
"
